home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / cp2dekit / h / cpiface.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-29  |  3.5 KB  |  141 lines

  1. //***************************************************************************
  2. //
  3. // this file is (c) '94-'96 Niklas Beisert
  4. //
  5. // this file is part of the cubic player development kit.
  6. // you may only use/modify/spread this file under the terms stated
  7. // in the cubic player development kit accompanying documentation.
  8. //
  9. //***************************************************************************
  10.  
  11. class binfile;
  12. struct moduleinfostruct;
  13. struct cpifaceplayerstruct
  14. {
  15.   int (*OpenFile)(const char *path, moduleinfostruct &info, binfile *f);
  16.   void (*CloseFile)();
  17. };
  18.  
  19. extern unsigned short plNLChan;
  20. extern unsigned short plNPChan;
  21. extern unsigned char plSelCh;
  22. extern unsigned char plChanChanged;
  23. extern char plPause;
  24. extern char plMuteCh[];
  25. extern char plPanType;
  26. extern int (*plProcessKey)(unsigned short key);
  27. extern void (*plDrawGStrings)(short (*plTitleBuf)[132]);
  28. extern void (*plGetRealMasterVolume)(int &l, int &r);
  29. extern void (*plGetMasterSample)(short *, int len, int rate, int mode);
  30. extern int (*plIsEnd)();
  31. extern void (*plIdle)();
  32. extern void (*plSetMute)(int i, int m);
  33. extern int (*plGetLChanSample)(int ch, short *, int len, int rate);
  34. extern int (*plGetPChanSample)(int ch, short *, int len, int rate);
  35.  
  36. struct cpimoderegstruct
  37. {
  38.   char handle[9];
  39.   void (*SetMode)();
  40.   void (*Draw)();
  41.   int (*IProcessKey)(unsigned short);
  42.   int (*AProcessKey)(unsigned short);
  43.   int (*Event)(int ev);
  44. /*
  45.   int (*Open)();
  46.   void (*Close)();
  47.   int (*Init)();
  48.   void (*Done)();
  49.   int (*InitAll)();
  50.   void (*DoneAll)();
  51. */
  52.   cpimoderegstruct *next;
  53.   cpimoderegstruct *nextdef;
  54. };
  55.  
  56. struct cpitextmoderegstruct;
  57.  
  58. struct cpitextmodequerystruct
  59. {
  60.   unsigned char top;
  61.   unsigned char xmode;
  62.   unsigned char killprio;
  63.   unsigned char viewprio;
  64.   unsigned char size;
  65.   int hgtmin;
  66.   int hgtmax;
  67.   cpitextmoderegstruct *owner;
  68. };
  69.  
  70. struct cpitextmoderegstruct
  71. {
  72.   char handle[9];
  73.   int (*GetWin)(cpitextmodequerystruct &q);
  74.   void (*SetWin)(int xmin, int xwid, int ymin, int ywid);
  75.   void (*Draw)(int focus);
  76.   int (*IProcessKey)(unsigned short);
  77.   int (*AProcessKey)(unsigned short);
  78.   int (*Event)(int ev);
  79. /*
  80.   int (*GetFocus)();
  81.   void (*LoseFocus)();
  82.   int (*Open)();
  83.   void (*Close)();
  84.   int (*Init)();
  85.   void (*Done)();
  86.   int (*InitAll)();
  87.   void (*DoneAll)();
  88.   void (*SetMode)();
  89. */
  90.   int active;
  91.   cpitextmoderegstruct *nextact;
  92.   cpitextmoderegstruct *next;
  93.   cpitextmoderegstruct *nextdef;
  94. };
  95.  
  96. enum
  97. {
  98.   cpievOpen, cpievClose, cpievInit, cpievDone, cpievInitAll, cpievDoneAll,
  99.   cpievGetFocus, cpievLoseFocus, cpievSetMode,
  100. };
  101.  
  102. void cpiDrawGStrings();
  103. void cpiSetGraphMode(int big);
  104. void cpiSetTextMode(int size);
  105. void plReadCubicPic();
  106. void cpiResetScreen();
  107. void cpiRegisterMode(cpimoderegstruct *m);
  108. void cpiSetMode(const char *hand);
  109. void cpiGetMode(char *hand);
  110. void cpiTextRegisterMode(cpitextmoderegstruct *mode);
  111. void cpiTextSetMode(const char *name);
  112. void cpiTextRecalc();
  113.  
  114. void plUseMessage(char **);
  115.  
  116. struct insdisplaystruct
  117. {
  118.   int n40,n52,n80;
  119.   char *title80;
  120.   char *title132;
  121.   void (*Mark)();
  122.   void (*Clear)();
  123.   void (*Display)(short *buf, int len, int n, int mode);
  124.   void (*Done)();
  125. };
  126.  
  127. void plUseInstruments(insdisplaystruct &x);
  128.  
  129. void plUseChannels(void (*Display)(short *buf, int len, int i));
  130. extern int plTrackActive;
  131.  
  132. struct notedotsdata
  133. {
  134.   unsigned char chan;
  135.   unsigned short note;
  136.   unsigned short voll,volr;
  137.   unsigned char col;
  138. };
  139.  
  140. void plUseDots(int (*get)(notedotsdata *, int));
  141.